package com.hisysteTopet.hisystepet.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hisysteTopet.hisystepet.bean.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


/**
 *
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    // 查询账号密码
    @Select("SELECT * FROM user WHERE username = #{username}")
    public User selectToMessage(String username);

    // 修改密码
    @Update("UPDATE `user` SET `password` = #{password} WHERE username = #{username}")
    public void updateToPassword(String username,String password);

    // 添加账号
    @Insert("INSERT INTO `user` VALUE(#{username},#{password})")
    public void insertToUser(String username,String password);
}
